package com.changgou.goods.handler;

import com.changgou.entity.Result;
import com.changgou.entity.StatusCode;

public class CustomError extends RuntimeException {
    private Result result;

    public CustomError(Result result) {
        result.setFlag(false);
        result.setMessage("空指针异常");
        result.setCode(StatusCode.BRANDNAMEISEMPTYERROR);

        this.result = result;
    }

    public Result getResult() {
        return result;
    }
}
